/**
 * 项目名：化工企业安全生产信息化管理平台
 * 日期：    2020-03-01 22:19:07
 * Copyright (c) 2015- -版权所有
 */

package com.joysuch.wwyt.edu.service;

import com.joysuch.wwyt.common.enums.CoursewareStates;
import com.joysuch.wwyt.core.exception.BusinessRestrictionsException;
import com.joysuch.wwyt.edu.bean.EduCoursewareDetailBean;
import com.joysuch.wwyt.edu.bean.EduCoursewareEditBean;
import com.joysuch.wwyt.edu.bean.EduCoursewareListBean;
import com.joysuch.wwyt.edu.bean.EduCoursewareListBean.SearchEduCourseware;
import com.joysuch.wwyt.edu.entity.EduCourseware;
import com.querydsl.core.types.Predicate;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

public interface EduCoursewareService {

    public EduCourseware add(EduCoursewareEditBean entity);

    void update(EduCoursewareEditBean entity);

    Page<EduCoursewareListBean> findByPage(Pageable page, SearchEduCourseware condition);

    void delete(Long id) throws BusinessRestrictionsException;

    EduCoursewareDetailBean getById(Long id);

    EduCourseware findById(Long id);

    void audit(Long id, CoursewareStates state, String remark);

    Page<EduCoursewareListBean> findAuditByPage(Pageable page, SearchEduCourseware condition);

    Page<EduCoursewareListBean> findByPage(Pageable page, Predicate predicate);

    public void applyForAudit(Long id);

    Page<EduCoursewareDetailBean> findCoursecenterPage(Long courseId, Long coursewareTypeId, Pageable page);
}
